package com.itheima.springboot_enable;

import com.itheima.config.UserConfig;
import com.itheima.config.*;
import com.itheima.domain.Role;
import com.itheima.domain.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import redis.clients.jedis.Jedis;

import java.util.Map;

@SpringBootApplication
//@ComponentScan("com.itheima.config")
//@Import(UserConfig.class)
//@EnableUser
//@Import(User.class)
//@Import(MyImportSelector.class)
@Import(MyImportBeanDefinitionRegistrar.class)
public class SpringbootEnableApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(SpringbootEnableApplication.class, args);

		/*Object user = context.getBean("user");
		System.out.println(user);*/

		/*Role bean = context.getBean(Role.class);
		System.out.println(bean);*/
/*
		Map<String, User> beansOfType = context.getBeansOfType(User.class);
		System.out.println(beansOfType);*/

		Jedis bean = context.getBean(Jedis.class);
		System.out.println(bean);


	}

}
